<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>火电机组冷端优化系统 - 散热片污垢监测</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <style>
        :root {
            --primary-bg: #0f172a;
            --secondary-bg: #1e293b;
            --card-bg: #1a2435;
            --accent: #5eead4;
            --accent-hover: #88f3e2;
            --text-primary: #e2e8f0;
            --text-secondary: #94a3b8;
            --text-tertiary: #64748b;
            --border-color: #334155;
            --success: #4ade80;
            --warning: #fbbf24;
            --error: #f87171;
            --power-color: #f97316;
            --load-color: #38bdf8;
            --pressure-color: #8b5cf6;
            --temp-color: #f43f5e;
            --font-main: 'Segoe UI', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
            --spacing-sm: 8px;
            --spacing-md: 16px;
            --spacing-lg: 24px;
            --spacing-xl: 32px;
            --radius-sm: 4px;
            --radius-md: 8px;
            --radius-lg: 12px;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            background: var(--primary-bg);
            color: var(--text-primary);
            font-family: var(--font-main);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: auto;
        }
        
        /* 导航栏容器 */
        .navbar {
            background: var(--secondary-bg);
            border-bottom: 1px solid var(--border-color);
            padding: 0 var(--spacing-lg);
            height: 60px;
            display: flex;
            align-items: center;
            z-index: 100;
        }
        
        /* Logo区域 */
        .logo-area {
            display: flex;
            align-items: center;
            gap: var(--spacing-md);
            padding-right: var(--spacing-lg);
            border-right: 1px solid var(--border-color);
        }
        
        .logo-icon {
            width: 36px;
            height: 36px;
            background: var(--accent);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--primary-bg);
            font-size: 1rem;
        }
        
        .logo-text {
            font-size: 1.2rem;
            font-weight: 600;
            background: linear-gradient(to right, var(--text-primary), var(--accent));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        
        /* 导航区域 */
        .nav-area {
            flex: 1;
            padding: 0 var(--spacing-xl);
            display: flex;
        }
        
        .nav-menu {
            display: flex;
            list-style: none;
            gap: var(--spacing-xl);
        }
        
        .nav-item {
            position: relative;
        }
        
        .nav-link {
            color: var(--text-secondary);
            text-decoration: none;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: var(--spacing-sm);
            padding: var(--spacing-sm) var(--spacing-md);
            border-radius: var(--radius-sm);
            transition: all 0.3s ease;
        }
        
        .nav-link:hover, .nav-link.active {
            color: var(--accent);
            background: rgba(94, 234, 212, 0.1);
        }
        
        .nav-link i {
            font-size: 0.9rem;
        }
        
        /* 用户区域 */
        .user-area {
            display: flex;
            align-items: center;
            gap: var(--spacing-md);
            position: relative;
        }
        
        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: linear-gradient(45deg, var(--accent), #4a7bff);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 0.9rem;
        }
        
        /* 内容区域 */
        .content-area {
            flex: 1;
            padding: var(--spacing-xl);
            overflow: auto;
            background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%231a2435"/><path d="M20,20 L80,20 L80,80 L20,80 Z" stroke="%23334155" fill="none" stroke-width="0.5"/></svg>');
            background-size: 20px 20px;
        }
        
        /* 监测页面样式 */
        .cleaning-monitoring {
            max-width: 1600px;
            margin: 0 auto;
        }
        
        /* 机组选择区域 */
        .unit-selector {
            background: var(--card-bg);
            border-radius: var(--radius-md);
            padding: var(--spacing-lg);
            margin-bottom: var(--spacing-xl);
            border: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .selector-group {
            display: flex;
            gap: var(--spacing-xl);
        }
        
        .selector-item {
            display: flex;
            flex-direction: column;
        }
        
        .selector-label {
            font-size: 0.9rem;
            color: var(--text-secondary);
            margin-bottom: var(--spacing-sm);
        }
        
        .selector-select {
            padding: var(--spacing-sm) var(--spacing-md);
            background: rgba(26, 36, 53, 0.7);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-sm);
            color: var(--text-primary);
            font-family: var(--font-main);
        }
        
        /* 卡片样式 */
        .card {
            background: var(--card-bg);
            border-radius: var(--radius-md);
            padding: var(--spacing-lg);
            margin-bottom: var(--spacing-xl);
            border: 1px solid var(--border-color);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }
        
        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: var(--spacing-lg);
            padding-bottom: var(--spacing-md);
            border-bottom: 1px solid var(--border-color);
        }
        
        .card-title {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--accent);
            display: flex;
            align-items: center;
            gap: var(--spacing-sm);
        }
        
        .card-action {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(94, 234, 212, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }
        
        /* 指标面板 */
        .panel-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: var(--spacing-lg);
            margin-bottom: var(--spacing-lg);
        }
        
        .panel-item {
            background: rgba(26, 36, 53, 0.5);
            border-radius: var(--radius-md);
            padding: var(--spacing-lg);
            border: 1px solid var(--border-color);
            text-align: center;
        }
        
        .panel-title {
            font-size: 1rem;
            color: var(--text-secondary);
            margin-bottom: var(--spacing-md);
        }
        
        .panel-value {
            font-size: 1.8rem;
            font-weight: 700;
            margin: var(--spacing-md) 0;
        }
        
        .panel-unit {
            font-size: 0.9rem;
            color: var(--text-tertiary);
        }
        
        /* 图表容器 */
        .chart-container {
            height: 300px;
            margin-top: var(--spacing-lg);
            position: relative;
        }
        
        .chart-grid {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: grid;
            grid-template-columns: repeat(10, 1fr);
            grid-template-rows: repeat(5, 1fr);
            opacity: 0.2;
        }
        
        .chart-grid-line {
            border-right: 1px solid var(--border-color);
            border-bottom: 1px solid var(--border-color);
        }
        
        .chart-labels {
            position: absolute;
            bottom: 10px;
            left: 0;
            width: 100%;
            display: flex;
            justify-content: space-between;
            padding: 0 20px;
            font-size: 0.8rem;
            color: var(--text-tertiary);
        }
        
        /* 诊断表格 */
        .diagnosis-table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: var(--spacing-lg);
        }
        
        .diagnosis-table th {
            text-align: left;
            padding: var(--spacing-md);
            background: rgba(26, 36, 53, 0.5);
            color: var(--text-secondary);
            font-weight: 500;
            border-bottom: 1px solid var(--border-color);
        }
        
        .diagnosis-table td {
            padding: var(--spacing-md);
            border-bottom: 1px solid var(--border-color);
        }
        
        .diagnosis-table tr:last-child td {
            border-bottom: none;
        }
        
        .status-good {
            color: var(--success);
        }
        
        .status-warning {
            color: var(--warning);
        }
        
        .status-bad {
            color: var(--error);
        }
        
        /* 时间选择器 */
        .time-selector {
            display: flex;
            gap: var(--spacing-md);
            margin-bottom: var(--spacing-lg);
        }
        
        .time-btn {
            padding: 8px 16px;
            border-radius: var(--radius-sm);
            background: rgba(94, 234, 212, 0.1);
            color: var(--text-secondary);
            border: none;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .time-btn.active {
            background: rgba(94, 234, 212, 0.3);
            color: var(--accent);
        }
        
        /* 响应式调整 */
        @media (max-width: 1200px) {
            .panel-grid {
                grid-template-columns: 1fr 1fr;
            }
        }
        
        @media (max-width: 768px) {
            .navbar {
                flex-direction: column;
                height: auto;
                padding: var(--spacing-md);
            }
            
            .logo-area {
                padding-right: 0;
                border-right: none;
                margin-bottom: var(--spacing-md);
            }
            
            .nav-area {
                padding: 0;
                margin-bottom: var(--spacing-md);
            }
            
            .nav-menu {
                flex-wrap: wrap;
                justify-content: center;
                gap: var(--spacing-md);
            }
            
            .unit-selector {
                flex-direction: column;
                align-items: flex-start;
                gap: var(--spacing-md);
            }
            
            .selector-group {
                flex-direction: column;
                width: 100%;
                gap: var(--spacing-md);
            }
            
            .panel-grid {
                grid-template-columns: 1fr;
            }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar">
        <div class="logo-area">
            <div class="logo-icon">
                <i class="fas fa-bolt"></i>
            </div>
            <div class="logo-text">冷端优化系统</div>
        </div>
        
        <div class="nav-area">
            <ul class="nav-menu">
                <li class="nav-item">
                    <a href="#" class="nav-link">
                        <i class="fas fa-tachometer-alt"></i> 驾驶舱
                    </a>
                </li>
                
                <li class="nav-item">
                    <a href="#" class="nav-link">
                        <i class="fas fa-cogs"></i> 核心功能
                    </a>
                </li>
                
                <li class="nav-item">
                    <a href="#" class="nav-link">
                        <i class="fas fa-snowflake"></i> 冬季防冻
                    </a>
                </li>
                
                <li class="nav-item">
                    <a href="#" class="nav-link active">
                        <i class="fas fa-broom"></i> 清洁分析
                    </a>
                </li>
                
                <li>
                    <a href="#" class="nav-link">
                        <i class="fas fa-chart-bar"></i> 报表
                    </a>
                </li>
            </ul>
        </div>
        
        <div class="user-area">
            <div class="user-avatar">
                <i class="fas fa-user"></i>
            </div>
        </div>
    </nav>
    
    <!-- 内容区域 -->
    <div class="content-area">
        <div class="cleaning-monitoring">
            <!-- 机组选择区域 -->
            <div class="unit-selector">
                <div class="selector-group">
                    <div class="selector-item">
                        <div class="selector-label">电厂</div>
                        <select class="selector-select">
                            <option selected>华光电厂</option>
                            <option>华东电厂</option>
                            <option>华南电厂</option>
                            <option>西北电厂</option>
                        </select>
                    </div>
                    
                    <div class="selector-item">
                        <div class="selector-label">机组</div>
                        <select class="selector-select">
                            <option>#1机组</option>
                            <option>#2机组</option>
                            <option selected>#3机组</option>
                            <option>#4机组</option>
                        </select>
                    </div>
                </div>
            </div>
            
            <!-- 第一部分：传热系数与清洁因子智能评估 -->
            <div class="card">
                <div class="card-header">
                    <h2 class="card-title">
                        <i class="fas fa-thermometer-half"></i> 传热系数与清洁因子智能评估
                    </h2>
                    <div class="card-action">
                        <i class="fas fa-expand"></i>
                    </div>
                </div>
                
                <!-- 参数面板 -->
                <div class="panel-grid">
                    <div class="panel-item">
                        <div class="panel-title">当前传热系数</div>
                        <div class="panel-value">2480</div>
                        <div class="panel-unit">W/(m²·K)</div>
                    </div>
                    
                    <div class="panel-item">
                        <div class="panel-title">清洁因子</div>
                        <div class="panel-value">0.83</div>
                        <div class="panel-unit">清洁度指数</div>
                    </div>
                    
                    <div class="panel-item">
                        <div class="panel-title">灰污系数</div>
                        <div class="panel-value">0.85</div>
                        <div class="panel-unit">污染物残留系数</div>
                    </div>
                    
                    <div class="panel-item">
                        <div class="panel-title">冲洗建议</div>
                        <div class="panel-value">建议清洗</div>
                        <div class="panel-unit">根据灰污系数分析</div>
                    </div>
                </div>
                
                <!-- 清洁因子变化曲线 -->
                <div class="chart-container">
                    <canvas id="cleanFactorChart"></canvas>
                </div>
            </div>
            
            <!-- 第二部分：凝汽器节能诊断 -->
            <div class="card">
                <div class="card-header">
                    <h2 class="card-title">
                        <i class="fas fa-clipboard-check"></i> 凝汽器节能诊断
                    </h2>
                    <div class="card-action">
                        <i class="fas fa-expand"></i>
                    </div>
                </div>
                
                <!-- 诊断表格 -->
                <table class="diagnosis-table">
                    <thead>
                        <tr>
                            <th>指标</th>
                            <th>单位</th>
                            <th>应达值</th>
                            <th>实际值</th>
                            <th>偏差值</th>
                            <th>状态</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>凝汽器传热偏差</td>
                            <td>℃</td>
                            <td>≤2.0</td>
                            <td>3.2</td>
                            <td>+1.2</td>
                            <td class="status-warning">偏高</td>
                        </tr>
                        <tr>
                            <td>清洁因子</td>
                            <td>-</td>
                            <td>≥0.85</td>
                            <td>0.83</td>
                            <td>-0.02</td>
                            <td class="status-good">正常</td>
                        </tr>
                        <tr>
                            <td>水阻</td>
                            <td>kPa</td>
                            <td>≤75</td>
                            <td>82.4</td>
                            <td>+7.4</td>
                            <td class="status-bad">偏高</td>
                        </tr>
                    </tbody>
                </table>
                
                <!-- 诊断结果 -->
                <div class="panel-item">
                    <div class="panel-title">诊断结果</div>
                    <div class="panel-value">建议清洁处理</div>
                    <div class="panel-desc">凝汽器传热偏差较大（3.2℃），说明清洁度较差；水阻偏高（82.4kPa），说明管束存在结垢或堵塞。</div>
                </div>
            </div>
            
            <!-- 第三部分：清洗决策与执行 -->
            <div class="card">
                <div class="card-header">
                    <h2 class="card-title">
                        <i class="fas fa-cogs"></i> 清洗决策与执行
                    </h2>
                    <div class="card-action">
                        <i class="fas fa-expand"></i>
                    </div>
                </div>
                
                <!-- 清洗参数面板 -->
                <div class="panel-grid">
                    <div class="panel-item">
                        <div class="panel-title">清洗成本</div>
                        <div class="panel-value">¥58,000</div>
                        <div class="panel-unit">全系统清洗预算</div>
                    </div>
                    
                    <div class="panel-item">
                        <div class="panel-title">最优清洗周期</div>
                        <div class="panel-value">62天</div>
                        <div class="panel-unit">基于历史数据分析</div>
                    </div>
                    
                    <div class="panel-item">
                        <div class="panel-title">最优清洗方式</div>
                        <div class="panel-value">高压水枪冲洗</div>
                        <div class="panel-unit">效率:92%/成本:低</div>
                    </div>
                    
                    <div class="panel-item">
                        <div class="panel-title">预计收益</div>
                        <div class="panel-value">¥24,600/月</div>
                        <div class="panel-unit">预计收益</div>
                    </div>
                </div>
                
                <!-- 时间选择器 -->
                <div class="time-selector">
                    <button class="time-btn active">一天</button>
                    <button class="time-btn">一周</button>
                    <button class="time-btn">一个月</button>
                </div>
                
                <!-- 图表容器 -->
                <div class="chart-container">
                    <canvas id="benefitChart"></canvas>
                </div>
            </div>
            
            <!-- 第四部分：清洗效果评估 -->
            <div class="card">
                <div class="card-header">
                    <h2 class="card-title">
                        <i class="fas fa-clipboard-list"></i> 清洗效果评估
                    </h2>
                    <div class="card-action">
                        <i class="fas fa-expand"></i>
                    </div>
                </div>
                
                <!-- 清洗效果表格 -->
                <table class="diagnosis-table">
                    <thead>
                        <tr>
                            <th>工况参数</th>
                            <th>单位</th>
                            <th>清洗前</th>
                            <th>清洗后</th>
                            <th>差值</th>
                            <th>改善率</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>同等工况背压</td>
                            <td>kPa</td>
                            <td>15.3</td>
                            <td>12.8</td>
                            <td>-2.5</td>
                            <td>16.3%</td>
                        </tr>
                        <tr>
                            <td>风机总功耗</td>
                            <td>kW</td>
                            <td>2850</td>
                            <td>2350</td>
                            <td>-500</td>
                            <td>17.5%</td>
                        </tr>
                        <tr>
                            <td>冷凝水温度</td>
                            <td>℃</td>
                            <td>38.5</td>
                            <td>36.2</td>
                            <td>-2.3</td>
                            <td>6.0%</td>
                        </tr>
                        <tr>
                            <td>发电功率损失</td>
                            <td>MW</td>
                            <td>8.5</td>
                            <td>5.2</td>
                            <td>-3.3</td>
                            <td>38.8%</td>
                        </tr>
                        <tr>
                            <td>经济效益</td>
                            <td>元/小时</td>
                            <td>1520</td>
                            <td>2460</td>
                            <td>+940</td>
                            <td>61.8%</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    
    <script>
        // 页面加载完成后执行
        document.addEventListener('DOMContentLoaded', function() {
            // 清洁因子变化曲线图
            const cleanFactorCtx = document.getElementById('cleanFactorChart').getContext('2d');
            new Chart(cleanFactorCtx, {
                type: 'line',
                data: {
                    labels: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
                    datasets: [{
                        label: '清洁因子',
                        data: [0.92, 0.89, 0.86, 0.84, 0.82, 0.85, 0.88, 0.87, 0.83, 0.81, 0.79, 0.76],
                        borderColor: '#5eead4',
                        backgroundColor: 'rgba(94, 234, 212, 0.1)',
                        tension: 0.4,
                        fill: true
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    plugins: {
                        title: {
                            display: true,
                            text: '清洁因子变化趋势 (2023年)',
                            color: '#94a3b8',
                            font: {
                                size: 14
                            }
                        },
                        legend: {
                            labels: {
                                color: '#94a3b8'
                            }
                        }
                    },
                    scales: {
                        x: {
                            grid: {
                                color: 'rgba(148, 163, 184, 0.1)'
                            },
                            ticks: {
                                color: '#94a3b8'
                            }
                        },
                        y: {
                            grid: {
                                color: 'rgba(148, 163, 184, 0.1)'
                            },
                            ticks: {
                                color: '#94a3b8'
                            },
                            suggestedMin: 0.7,
                            suggestedMax: 1.0
                        }
                    }
                }
            });
            
            // 经济效益曲线图
            const benefitCtx = document.getElementById('benefitChart').getContext('2d');
            const benefitChart = new Chart(benefitCtx, {
                type: 'line',
                data: {
                    labels: Array.from({length: 24}, (_, i) => `${i}:00`),
                    datasets: [{
                        label: '清洗收益',
                        data: [120, 250, 380, 480, 520, 580, 630, 680, 720, 750, 780, 820, 
                               850, 880, 920, 950, 980, 1020, 1080, 1120, 1150, 1180, 1220, 1250],
                        borderColor: '#4ade80',
                        backgroundColor: 'rgba(74, 222, 128, 0.1)',
                        tension: 0.4,
                        fill: true
                    }, {
                        label: '未清洗损失',
                        data: [150, 300, 420, 530, 610, 680, 730, 790, 840, 890, 930, 970, 
                               1000, 1040, 1080, 1120, 1170, 1220, 1280, 1350, 1420, 1480, 1540, 1600],
                        borderColor: '#f87171',
                        backgroundColor: 'rgba(248, 113, 113, 0.1)',
                        tension: 0.4,
                        fill: true
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    plugins: {
                        title: {
                            display: true,
                            text: '未来一天清洗效益分析',
                            color: '#94a3b8',
                            font: {
                                size: 14
                            }
                        },
                        legend: {
                            labels: {
                                color: '#94a3b8'
                            }
                        }
                    },
                    scales: {
                        x: {
                            grid: {
                                color: 'rgba(148, 163, 184, 0.1)'
                            },
                            ticks: {
                                color: '#94a3b8'
                            }
                        },
                        y: {
                            grid: {
                                color: 'rgba(148, 163, 184, 0.1)'
                            },
                            ticks: {
                                color: '#94a3b8',
                                callback: function(value) {
                                    return value + '元';
                                }
                            }
                        }
                    }
                }
            });
            
            // 时间选择器交互
            const timeBtns = document.querySelectorAll('.time-btn');
            timeBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    // 移除所有按钮的active类
                    timeBtns.forEach(b => b.classList.remove('active'));
                    
                    // 为当前按钮添加active类
                    this.classList.add('active');
                    
                    // 根据选择的时间更新图表数据
                    const period = this.textContent;
                    updateChartForPeriod(period);
                });
            });
            
            function updateChartForPeriod(period) {
                let labels = [];
                let benefitData = [];
                let lossData = [];
                
                if (period === '一天') {
                    labels = Array.from({length: 24}, (_, i) => `${i}:00`);
                    benefitData = Array.from({length: 24}, (_, i) => Math.round(120 + i * 50 + Math.random() * 50));
                    lossData = Array.from({length: 24}, (_, i) => Math.round(150 + i * 60 + Math.random() * 50));
                    benefitChart.options.plugins.title.text = '未来一天清洗效益分析';
                } else if (period === '一周') {
                    labels = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'];
                    benefitData = [650, 1200, 1850, 2400, 3050, 3600, 4150];
                    lossData = [720, 1450, 2180, 2900, 3650, 4300, 5050];
                    benefitChart.options.plugins.title.text = '未来一周清洗效益分析';
                } else if (period === '一个月') {
                    labels = Array.from({length: 30}, (_, i) => `${i+1}日`);
                    benefitData = Array.from({length: 30}, (_, i) => Math.round(5000 + i * 1200 + Math.random() * 500));
                    lossData = Array.from({length: 30}, (_, i) => Math.round(6000 + i * 1500 + Math.random() * 600));
                    benefitChart.options.plugins.title.text = '未来一月清洗效益分析';
                }
                
                benefitChart.data.labels = labels;
                benefitChart.data.datasets[0].data = benefitData;
                benefitChart.data.datasets[1].data = lossData;
                benefitChart.update();
            }
        });
    </script>
</body>
</html>
